// 登录相关的api
import request from "@/utils/request";

// 获取图形验证码
export const getPicCode = () => {
  return request({
    url: "/captcha/image",
    method: "get",
  });
};
// 2.获取短信验证码
export const getMsgCode = (captchaCode, captchaKey, mobile) => {
  return request.post("/captcha/sendSmsCaptcha", {
    form: {
      captchaCode,
      captchaKey,
      mobile,
    },
  });
};
// 3.登录
export const codeLogin = (mobile, smsCode) => {
  return request.post("/passport/login", {
    form: {
      isParty: false,
      partyData: {},
      mobile,
      smsCode,
    },
  });
};
